import request from "@/utils/request";

// 查询参数列表
export function listConfig(query) {
  return request({
    url: "/cargo/info/page",
    method: "get",
    params: query,
  });
}

// 查询商品列表
export function goodsList(data) {
  return request({
    url: "/cargo/info/page",
    method: "post",
    data: data,
  });
}

// 新增商品
export function addGoods(data) {
  return request({
    url: "/cargo/info/add",
    method: "post",
    data: data,
  });
}

// 编辑商品
export function updateGoods(data) {
  return request({
    url: "/cargo/info/update",
    method: "post",
    data: data,
  });
}

// 删除商品
export function deleteGoods(query) {
  return request({
    url: "/cargo/info/remove",
    method: "get",
    params: query,
  });
}

// 获取精品推荐详情
export function getRecommendDetail(query) {
  return request({
    url: "/cargo/boutique/detail",
    method: "get",
    params: query,
  });
}

// 修改精品推荐详情
export function updateRecommendDetail(data) {
  return request({
    url: "/cargo/boutique/update",
    method: "post",
    data,
  });
}
